import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class Main {
	private static final int COUNT_BITS = Integer.SIZE - 3;
	private static final int CAPACITY = (1 << COUNT_BITS) - 1;
	public static void main(String args[]) {
//		
//		 boolean flag = judgeIfDuringPeroid();
//		 System.out.println(judgeIfDuringPeroid());
//		System.out.println(Integer.toHexString(MODE_MASK));
		SubTest subTest = new SubTest();
		
	}
	private static final int MODE_SHIFT = 30;
    private static final int MODE_MASK  = 0x3 << MODE_SHIFT;
	private static boolean judgeIfDuringPeroid() {
        // 判定是否在活动时间范围内
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        // 世界标准时区
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        try {
            final Date start = simpleDateFormat.parse("2015-12-22 00:59");
            final Date end = simpleDateFormat.parse("2016-12-22 00:59");
            long startTime = start.getTime();
            final long endTime = end.getTime();
            final long currentTimeMillis = System.currentTimeMillis();
            if (currentTimeMillis > startTime && currentTimeMillis < endTime) {
                return true;
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return false;
    }
}
